<template>
	<view class="article-detail bc-w p-50 p-t-0" :style="css.wpage+'min-height:'+$xyfun.xysys().windowHeight+'px'" v-if="!isLoading">
		<text class="ts-50 tb left m-b-50 wa m-t-30">
			<text class="tc-green">{{ type === '1' ? '用户协议' : '隐私政策'}}</text>
		</text>
		<br>
		<view class="content">
			<rich-text :nodes="article.content"></rich-text>
		</view>
	</view>
</template>

<script>
	
	export default {
		
		data() {
			return {
				css:{},
				isLoading:true,
				id: 103,
				article:{},
				type: '1',
			}
		},
		onLoad() {
			this.$xyfun.setNavBar(' ');
			this.css = this.$xyfun.css();
			this.loadData();
		},
		methods: {
			
			loadData(){
				this.$api.get({
					url: '/article/detail',
					loadingTip:'加载中...',
					data: {
						id:this.$Route.query.id,
					},
					success: res => {
						this.isLoading = false;
						this.article = res;
						this.type = this.$Route.query.id
						this.article.content = this.article.content.replace(/\<img/g, "<img style='max-width: 100%;vertical-align: middle;'");
						// this.$xyfun.setNavBar(res.title);
					}
				});
			},
			
			
			
		}
	}
</script>

<style scoped lang="scss">
	.article-detail{
		.content{text-align: justify;}
	}
</style>
